package sctu.edu.java.year2016.team01.xuhanmei.day20160606.LearnThread;

/**
 * Created by Administrator on 2016/6/6.
 */
public class TextRunnable {
    public static void main(String[] args) {
        RunnableImpl ri = new RunnableImpl();

        Thread thread1 = new Thread(ri);//将接口对象作为参数传进线程对象
        Thread thread2 = new Thread(ri);

        thread1.setName("线程1：");//给线程取名字
        thread2.setName("线程2：");

        thread1.start();//开启线程
        thread2.start();
    }
}
